
import { VuexModule, Module, Action, Mutation, getModule, MutationAction } from 'vuex-module-decorators';
import store from '@/store';
import servers from '@/servers/index'


// 辅助监控
@Module({ dynamic: true, store, name: 'OnlineMonitor', namespaced: true })
class OnlineMonitor extends VuexModule  {
  // state
  public activeRouter = 1
  public stationName = ''//下拉框选中的变电站标题
  public stationId = ''//下拉框选中的变电站标题对应的id

  public secondLevelObj:any={}  // 二级页面导航传 右边字段 (油色谱.铁心接地电流....)

  get getterstationId() {
    return this.stationId
  }

  get getterstationName() {
    
    return this.stationName
  }

  @Mutation
  setStationName(item: any) {
    this.stationName = item.name ;
    this.stationId = item.code;
  }

  @Mutation
  setsecondLevelObj(item: any) {
    // console.log(item);
    
    this.secondLevelObj=item
  }
}

export const OnlineMonitorModule = getModule(OnlineMonitor);
